#include <bits/stdc++.h>
using namespace std;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  for (cin >> T; T; T--) {
    int n;

    cin >> n;
    vector<int> cnt(n + 1, 0);
    for (int i = 0; i < n; i++) {
      int x;

      cin >> x;
      cnt[x]++;
    }

    int mex = 0;
    for (; mex <= n; mex++) {
      if (cnt[mex] == 0) {
        break;
      }
    }

    vector<int> diff_ans(n + 2, 0);

    for (; mex >= 0; mex--) {
      diff_ans[cnt[mex]]++;
      diff_ans[n - mex + 1]--;
    }
    for (int i = 0; i <= n; i++) {
      diff_ans[i + 1] += diff_ans[i];
      cout << diff_ans[i] << " ";
    }
    cout << "\n";
  }
  return 0;
}